HA$PBExportHeader$uo_middlb.sru
forward
global type uo_middlb from dropdownlistbox
end type
end forward

global type uo_middlb from dropdownlistbox
integer width = 713
integer height = 604
integer taborder = 10
integer textsize = -8
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
boolean allowedit = true
boolean sorted = false
boolean vscrollbar = true
event type integer ue_rellena ( string as_cadena )
event ue_tecla2 pbm_dwnkey
end type
global uo_middlb uo_middlb

type variables
string is_cadena,is_columna[],is_columna2[]
long il_index
end variables

event type integer ue_rellena(string as_cadena);long ll_indice= 1
setpointer(hourglass!)

string ls_campo[]
prepare sqlsa from :as_cadena;
declare cur01 dynamic cursor for sqlsa;
open dynamic cur01 ;
fetch cur01 into :is_columna[1], :is_columna2[1];
do while sqlca.sqlcode=0 
	this.additem(is_columna2[ll_indice])
	ll_indice++
	fetch cur01 into :is_columna[ll_indice], :is_columna2[ll_indice];
loop
if sqlca.sqlcode = -1 then
   return -1
else
	close cur01 ;
	return 1
end if
setpointer(arrow!)




end event

event ue_tecla2;int li_key
if key=keyback! then
	is_cadena=left(is_cadena,len(is_cadena) -1)
else
	for li_key= 1 to 127
		if keydown(li_key) then
			is_cadena=is_cadena+char(li_key)
		end if
	next
end if
this.selectitem(is_cadena,1)


end event

event selectionchanged;il_index=index
if index <= 0 then return
end event

on uo_middlb.create
end on

on uo_middlb.destroy
end on

